package com.example.activitidemo.config;

import org.activiti.engine.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ActivitiConfig {
    @Autowired
    private ProcessEngine processEngine;

//    @Bean
//    public ProcessEngine processEngine(){
//        return ProcessEngines.getDefaultProcessEngine();
//    }

    @Bean
    public RuntimeService runtimeService(){
        return processEngine.getRuntimeService();
    }

    @Bean
    public TaskService taskService (){
        return processEngine.getTaskService();
    }

    @Bean
    public RepositoryService repositoryService(){
        return processEngine.getRepositoryService();
    }




}
